<?php
class Slider extends CI_Model {

	function get_slider($id = NULL){
		$query = $this->db->get('slider');
		return $query->result_array();
	}
		
	function add($data){
		$this->db->insert('slider',$data);
		return $this->db->insert_id();
	}
	
	function edit($id, $data){
		$this->db->where('id_slider', $id);
		$this->db->update('slider',$data);
	}
	
	function delete($id){
		$this->db->delete('slider', array('id_slider' => $id)); 
	}
}
?>
